package com.alibaba.controller;

import com.alibaba.bean.Rank;
import com.alibaba.bean.RankResult;
import com.alibaba.service.RankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/rank", method = RequestMethod.GET)
public class RankController {

    @Autowired
    private RankService rankService;

    @PostMapping("/rankPage")
    public RankResult rPage(Rank rank) {
        return rankService.rankPage(rank);
    }

}
